package com.share.constant;

/**
 * 整合security JWT
 */
public interface SecurityConstant {

    /**
     * 默认权限
     */
    String DEFAULT_PERMISSIONS = "*:*:*";

    String SIGN_KEY="admin-api";
    /**
     * 认证请求头key
     */
    String AUTHORIZATION_KEY = "Authorization";

    /**
     * JWT令牌前缀
     */
    String JWT_PREFIX = "Bearer ";

    /**
     * Basic认证前缀
     */
    String BASIC_PREFIX = "Basic";

    /**
     * JWT载体key
     */
    String JWT_PAYLOAD_KEY = "payload";

    /**
     * JWT唯一标识
     */
    String JWT_JTI = "jti";

    /**
     * JWT ID 唯一标识
     */
    String JWT_EXP = "exp";

    /**
     * JWT 储存权限前缀
     */
    String AUTHORITY_PREFIX = "ROLE_";

    /**
     * JWT储存权限属性
     */
    String JWT_AUTHORITIES_KEY = "authorities";

    String APP_API_PATTERN = "/*/api-api/**";

    /**
     * 黑名单token前缀
     */
    String TOKEN_BLACKLIST_PREFIX = "auth:token:blacklist:";

    /**
     * 微信端
     */
    String USER_TYPE_WX = "wx";

    /**
     * blog端
     */
    String USER_TYPE_BLOG = "blog";

    /**
     * 后台
     */
    String USER_TYPE_BACKSTAGE = "web";

}
